//part1:C05:ex5.11.cpp
#include <iostream>
int main(void) {
    using namespace std;
    unsigned int aCnt = 0, eCnt = 0, iCnt = 0, oCnt = 0, uCnt = 0;
    unsigned int spaceCnt = 0, tabCnt = 0, newlineCnt = 0;
    char ch;

    cout << "Enter some characters:" << endl;
    while (cin.get(ch)) {
        switch (ch) {
            case 'a':
            case 'A': 
                ++aCnt;
                break;
            case 'e':
            case 'E': 
                ++eCnt;
                break;
            case 'i':
            case 'I': 
                ++iCnt;
                break;
            case 'o':
            case 'O': 
                ++oCnt;
                break;
            case 'u':
            case 'U': 
                ++uCnt;
                break;
            case ' ':
                ++spaceCnt;
                break;
            case '\t':
                ++tabCnt;
                break;
            case '\n':
                ++newlineCnt;
                break;
        }
    }
    cout << "alpha a is : " << aCnt << endl;
    cout << "alpha e is : " << eCnt << endl;
    cout << "alpha i is : " << iCnt << endl;
    cout << "alpha o is : " << oCnt << endl;
    cout << "alpha u is : " << uCnt << endl;
    cout << "space is : " << spaceCnt << endl;
    cout << "tab is : " << tabCnt << endl;
    cout << "newlineCnt is : " << newlineCnt << endl;

    return 0;
}
